import request from '@/utils/request';


export async function queryMyPermission() {
    return request(`/user/enterprise/permission/my`);
}

export async function listEnterprisePermission() {
    return request(`/user/enterprise/permission`);
}

export async function listEnterpriseProjectPermission() {
    return request(`/user/enterprise/permission/project`);
}

export async function listRolePermission(roleId) {
    return request(`/user/enterprise/permission/role/${roleId}`);
}

export async function saveRolePermission( roleId, data) {
    return request(`/user/enterprise/permission/role/${roleId}`,
        {
            method: "POST",
            data: data
        }
    );
}